import './dlg-goto.css';
import {Dialog} from '../dlg/dlg.js';

export class GotoDialog extends Dialog{
  constructor(){
    super('goto-dlg');
    this.#init();
    this.#$btnCancel.onclick =  this.#onClose.bind(this)
}
  #init(){
    this.$ = this.querySelector;
    this.decorate(this.#html, '转到指定行');

    this.#$btnCancel = this.$('.cancel')
    this.#$btnGoto = this.$('.goto')
  }
#onClose(){  this.remove();}
  #$btnCancel = null;
  #$btnGoto = null;
  #$dlg = null;
  
#html = ''
  +'<div class="gotoMain">'
  +'<label for="">行号（L）：</label><br>'
  +'<input type="text" class="line-number"><br>'
  +'<input type="button" class="goto" value="转到">'
  +'<input type="button" class="cancel" value="取消">'
  +'</div>'
}

